package main

import (
	"log"
	"os"

	"gitcode.com/OpenDictionary/wiktionary2sql/cmd"
)

func main() {
	if err := cmd.Execute(); err != nil {
		log.Fatalln("Failed to parse command line arguments: ", err)
	}

	if len(os.Args) > 1 {
		for _, arg := range os.Args[1:] {
			exit_map := make(map[string]struct{}, 4)
			exit_map["-h"] = struct{}{}
			exit_map["--help"] = struct{}{}
			exit_map["-v"] = struct{}{}
			exit_map["--version"] = struct{}{}
			if _, ok := exit_map[arg]; ok {
				os.Exit(0)
			}
		}
	}

	log.Println("Execute main logic...")
}
